//定义了格式化信息所需的参数
#ifndef LOGMESSAGE_HPP
#define LOGMESSAGE_HPP
#include "util.hpp"
#include "logLevel.hpp"
#include <memory>
namespace blog
{
    class logMessage
    {
    public:
        using ptr= std::shared_ptr<logMessage>;
        logMessage(const std::string& loggerName,blog::logLevel::value level,std::string file,size_t line,const std::string& payload)
        :_loggerName(loggerName),
        _line(line),
        _level(level),
        _payload(payload),
        _time(blog::util::date::now()),
        _pid(std::this_thread::get_id()),
        _fileName(file)
        {
        }
    public:
        time_t _time;//时间
        std::thread::id _pid;//线程id
        logLevel::value _level;//信息等级
        std::string _payload;//有效载荷
        std::string _loggerName;//日志器名称
        std::string _fileName;//文件名
        size_t _line;//行号
    };
}
#endif